<div class="cil__base-block">
  <img class="cil__top-image" src="assets/images/centaur/change.svg" />
  <div class="cil__condition-switch-block" [class.active]="isAudit">
    <div class="cil__condition-switch--label">{{'AUDIT.ACQUIRER.OPEN_AUDIT_CONFIG' | i18n}}</div>
    <nz-switch [(ngModel)]="isAudit" (ngModelChange)="handleIsAuditChange($event)"></nz-switch>
  </div>

  <form *ngIf="isAudit" class="cil__base-block--form" nz-form>
    <div nz-row [nzGutter]="24">
      <div nz-col [nzSpan]="12">
        <nz-form-item>
          <nz-form-label>{{trans('AUDIT.LEVEL', { name: trans('AUDIT.LEVEL.STORE')})}}</nz-form-label>
          <nz-form-control nz-row [nzGutter]="24">
            <div nz-col [nzSpan]="6">
              <nz-switch [(ngModel)]="isStoreAudit" name="isStoreAudit"></nz-switch>
            </div>
            <div nz-col [nzSpan]="18" *ngIf="isStoreAudit">
              <nz-select
                [(ngModel)]="storeAudit"
                name="storeAudit"
              >
                <nz-option
                  *ngFor="let item of auditOptions"
                  [nzLabel]="item.label"
                  [nzValue]="item.value"
                ></nz-option>
              </nz-select>
            </div>
          </nz-form-control>
        </nz-form-item>
      </div>

      <div nz-col [nzSpan]="12">
        <nz-form-item>
          <nz-form-label>{{trans('AUDIT.LEVEL', { name: trans('AUDIT.LEVEL.TRANSREFUND')})}}</nz-form-label>
          <nz-form-control nz-row [nzGutter]="24">
            <div nz-col [nzSpan]="6">
              <nz-switch [(ngModel)]="isTransRefund" name="isTransRefund"></nz-switch>
            </div>
            <div nz-col [nzSpan]="18" *ngIf="isTransRefund">
              <nz-select
                [(ngModel)]="transRefundAudit"
                name="transRefundAudit"
              >
                <nz-option
                  *ngFor="let item of auditOptions"
                  [nzLabel]="item.label"
                  [nzValue]="item.value"
                ></nz-option>
              </nz-select>
            </div>
          </nz-form-control>
        </nz-form-item>
      </div>

      <!--
      <div nz-col [nzSpan]="12">
        <nz-form-item>
          <nz-form-label>门店汇率审核层级</nz-form-label>
          <nz-form-control nz-row [nzGutter]="24">
            <div nz-col [nzSpan]="6">
              <nz-switch [(ngModel)]="isExchangeRate" name="isExchangeRate"></nz-switch>
            </div>
            <div nz-col [nzSpan]="18" *ngIf="isExchangeRate">
              <nz-select
                [(ngModel)]="exchangeRateAudit"
                name="exchangeRateAudit"
              >
                <nz-option
                  *ngFor="let item of auditOptions"
                  [nzLabel]="item.label"
                  [nzValue]="item.value"
                ></nz-option>
              </nz-select>
            </div>
          </nz-form-control>
        </nz-form-item>
      </div>
      -->

      <div nz-col [nzSpan]="12">
        <nz-form-item>
          <nz-form-label>{{trans('AUDIT.LEVEL', { name: trans('AUDIT.LEVEL.RISKCONTROL') })}}</nz-form-label>
          <nz-form-control nz-row [nzGutter]="24">
            <div nz-col [nzSpan]="6">
              <nz-switch [(ngModel)]="isRiskControl" name="isRiskControl"></nz-switch>
            </div>
            <div nz-col [nzSpan]="18" *ngIf="isRiskControl">
              <nz-select
                [(ngModel)]="riskControlAudit"
                name="riskControlAudit"
              >
                <nz-option
                  *ngFor="let item of auditOptions"
                  [nzLabel]="item.label"
                  [nzValue]="item.value"
                ></nz-option>
              </nz-select>
            </div>
          </nz-form-control>
        </nz-form-item>
      </div>

      <div nz-col [nzSpan]="12">
        <nz-form-item>
          <nz-form-label>{{trans('AUDIT.LEVEL', { name: trans('AUDIT.LEVEL.OPERATION') })}}</nz-form-label>

          <nz-form-control nz-row [nzGutter]="24">
            <div nz-col [nzSpan]="6">
              <nz-switch [(ngModel)]="isOperation" name="isOperation"></nz-switch>
            </div>
            <div nz-col [nzSpan]="18" *ngIf="isOperation">
              <nz-select
                [(ngModel)]="operationAudit"
                name="operationAudit"
              >
                <nz-option
                  *ngFor="let item of auditOptions"
                  [nzLabel]="item.label"
                  [nzValue]="item.value"
                ></nz-option>
              </nz-select>
            </div>
          </nz-form-control>
        </nz-form-item>
      </div>

    </div>
  </form>
  <nz-divider nzDashed="true"></nz-divider>
</div>